home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / bbs / WWBBSDoors.lha / WWBBS / rexxDoors / Steven_Wright.rexx < prev    next >
OS/2 REXX Batch file  |  1995-04-25  |  2KB  |  82 lines

  1. /* $VER: Steven_Wright.rexx 1.0 (24.8.93)
  2.     copyright 1993 Richard Lee Stockton
  3.           FREELY DISTRIBUTABLE
  4. */
  5.  
  6. options results
  7.  
  8. BBSIDENTIFY EMULATION
  9. PARSE VAR RESULT type .
  10. if type = "ANSI" then
  11.   colorflag=1
  12. else
  13.   colorflag=0
  14.  
  15. BBSIDENTIFY USER
  16. PARSE VAR RESULT Username From Acces .
  17. name = substr(Username,2,length(Username)-2)
  18.  
  19. FF='0C'x
  20. CR='0D'x
  21. def=''
  22. pen3=''
  23.  
  24. IF ADDRESS()~='BAUD' THEN CR=''
  25. IF colorflag~=1 THEN
  26.   DO
  27.     def=''
  28.     pen3=''
  29.   END
  30.  
  31. SIGNAL ON BREAK_C
  32. SIGNAL ON BREAK_E
  33.  
  34. bbspath=GETCLIP('BBS_path')
  35. filename=bbspath'rexxDoors/Data/wright.data'
  36. IF ~EXISTS(filename) THEN
  37.   DO
  38.     SAY 'Can''t find data file,' filename'!'CR
  39.     EXIT
  40.   END
  41. size=WORD(STATEF(filename),2)
  42. fragment=size/3000
  43.  
  44. x=OPEN(f,'RAM:DUMMY','W')
  45. IF x=0 THEN EXIT(20);
  46. CALL WRITELN(f,'dummy')
  47. CALL CLOSE(f)
  48. micros=WORD(STATEF('RAM:DUMMY'),7)
  49. location=fragment*micros
  50. IF fragment>1000 THEN
  51.   location=location+fragment*RIGHT(TIME('S'),2)/100
  52. ELSE IF fragment>100 THEN
  53.   location=location+fragment*RIGHT(TIME('S'),1)/10
  54. location=TRUNC(location)
  55. IF location>size THEN location=micros
  56.  
  57. x=OPEN(f,filename,'R')
  58. IF x=0 THEN RETURN(10);
  59. CALL SEEK(f,location,'B')
  60. line=''
  61. DO WHILE line~=FF & ~EOF(f)
  62.   line=READLN(f)
  63. END
  64. line=''
  65. SAY CR
  66. IF ~EOF(f) THEN
  67.   DO WHILE line~=FF & ~EOF(f)
  68.     line=READLN(f)
  69.     IF ~EOF(f) & line~=FF THEN SAY line||CR
  70.   END
  71.  
  72. SAY pen3'                                                       -- Steven Wright 'def
  73.  
  74.  
  75. BREAK_C:
  76. BREAK_E:
  77. CALL CLOSE(f)
  78. RETURN
  79. EXIT
  80.  
  81. /* Steven_Wright.rexx */
  82.